// pages/managers/managers.js
const app=getApp()
const db = wx.cloud.database();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    allList: [],
    num: 3,
    zhanShou: "展开"
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow(){
    db.collection("manager").get({
      success:(res)=>{
        this.setData({
          allList:res.data[0].allList[0],
        })
        console.log(this.data.allList);
        }
    })

    this.setData({
      vanTop:app.globalData.vanTop
    })
  },

  unfold() {
    this.setData({
      num: this.data.num === 3 ? 50: 3,
      zhanShou: this.data.zhanShou === "展开" ? "收缩" : "展开"
    })
  },

  call(e){
    const phone=e.currentTarget.dataset.phone
    wx.makePhoneCall({
      phoneNumber: phone //仅为示例，并非真实的电话号码
    })
  },
  onShareAppMessage(){},
  onShareTimeline(){},
  onAddToFavorites(){},

})